package com.goodving.guli.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.goodving.guli.R;
import com.goodving.guli.activity.CropImageActivity;
import com.goodving.guli.bt.C0668a;
import com.goodving.guli.bt.DimPanelFragment;

/**
 * Created by john on 2015/12/24.
 */
public class PersonIconPanelFragment extends DimPanelFragment { // dD
    protected int inflateLayout() {
        return R.layout.fragment_select_image_question;
    }

    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.select_image_camera_area:
                C0668a.m8126a(getActivity(), C0668a.cf);
                getActivity().startActivityForResult(new Intent("android.media.action.IMAGE_CAPTURE"), 18);
                break;
            case R.id.select_image_local_area:
                C0668a.m8126a(getActivity(), C0668a.cg);
                getActivity().startActivityForResult(new Intent(getActivity(), CropImageActivity.class), 17);
                break;
        }
        dismiss();
    }

    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
    }

    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        View onCreateView = super.onCreateView(layoutInflater, viewGroup, bundle);
        onCreateView.findViewById(R.id.select_image_camera_area).setOnClickListener(this);
        onCreateView.findViewById(R.id.select_image_local_area).setOnClickListener(this);
        return onCreateView;
    }

    public void onPause() {
        super.onPause();
        C0668a.m8141b(C0668a.f3569l);
    }

    public void onResume() {
        super.onResume();
        C0668a.m8133a(C0668a.f3569l);
    }
}
